DEV: Sync libasr with LFortran#2827
Conversation
| strings_to_be_deallocated.p = strings_to_be_deallocated_copy; | ||
| } | ||
|
|
||
| void visit_ForEach(const ASR::ForEach_t &x) { |
There was a problem hiding this comment.
Not sure if this function / node was removed? It might be a specific node in LPython.
|
I think there was work in LPython to get various dicts and lists operations working, so it would be good to keep that if we can. But I think it is more important to sync, and keep it synced after that, so if it is difficult, we can temporarily remove it, and try to add it back later (the proper way: in LFortran first, then update a submodule). |
| | GoToTarget(int id, identifier name) | ||
| | If(expr test, stmt* body, stmt* orelse) | ||
| | IfArithmetic(expr test, int lt_label, int eq_label, int gt_label) | ||
| | Print(expr* values, expr? separator, expr? end) |
There was a problem hiding this comment.
I think end and separator are used in python syntax.
There was a problem hiding this comment.
They definitely are used in python syntax, but the ASR is supposed to be language agnostic, so I'm not really sure if we should've programming language details into ASR. Handle them in the frontend, and if it isn't possible, then have it in ASR.asdl of LFortran as well.
| separator = src; | ||
| separator = "\" \""; | ||
| //HACKISH way to handle print refactoring (always using stringformat). | ||
| // TODO : Implement stringformat visitor. |
There was a problem hiding this comment.
let's keep combination of this as we should keep separator and end memebers.
| if (x.m_end) { | ||
| this->visit_expr(*x.m_end); | ||
| tmp_gen += "\%s\""; | ||
| v.push_back(src); | ||
| } else { | ||
| tmp_gen += "\\n\""; | ||
| } |
There was a problem hiding this comment.
as well as keeping this.
ce689a9 to
ede6e7f
Compare
|
If you merge it then do squash and merge. |
| @@ -0,0 +1,551 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
this file should be automatically generated. Please add it to .gitignore.
| @@ -0,0 +1,4688 @@ | |||
| #pragma once | |||
There was a problem hiding this comment.
same, this has to be generated automatically
|
I would be busy. Please push the changes directly to my branch. |
Pranavchiku
left a comment
There was a problem hiding this comment.
I'm OK with these changes. I think sync will be complete once we get these tests one-by-one working.
| @@ -1,4 +1,4 @@ | |||
| from lpython import u8, u16, u32, u64 | |||
| from lpython import u8, u16, u32, u64, i8 | |||
There was a problem hiding this comment.
Are the changes in this file needed for tests to pass?
|
|
||
| // Generated by grammar/asdl_cpp.py | ||
|
|
||
| #include <libasr/alloc.h> |
There was a problem hiding this comment.
I'm commenting here to make sure that we don't commit this either. So that one of us can undo it.
Steps to complete,